package com.sh.redis锁;

import java.math.BigDecimal;

/**
 * @Auther: sh
 * @Version 1.0
 * @Description:
 */
public class Test {
    public static void main(String[] args) {
        BigDecimal a = new BigDecimal("0.1");
        BigDecimal b = new BigDecimal("0.2");
        BigDecimal c = new BigDecimal("0.3");

        System.out.println(a.add(b).equals(c)); // true

    }

}

